<?php
// var_dump($themeName) ;
?>
<?php $this->load->view('admin/common/pageHead');?>
<?php $this->load->view('admin/common/pageHeader');?>

<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>
<form name="form1" action="/updateTheme" method="post"
	onSubmit="return theme();">
	<input type="hidden" value="<?php echo $themeName["theme_id"]; ?>"
		id="themeID" name="themeID" />
	<table
		style="border-color: #EAC8B3; border-left: 1px solid #EAC8B3; border-right: 1px solid #EAC8B3; border-style: solid; border-width: 1px;"
		align="center">



		<tbody>
			<tr>
				<td colspan="3" class="fotter-color" align="center"><b>Edit Theme</b>
				</td>
			</tr>
			<tr>
				<td colspan="3" class="style2" align="left">


					<table border="0" cellpadding="0" cellspacing="0" height="25"
						width="400" align="center">
						<tbody>
							<tr>
								<td>Select Category<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><select name="categoryName" id="categoryName">
										<?php foreach ($categoryName as $temp => $admin){?>
										<option <?php if($themeName['cat_id']==$admin['cat_id']){ echo 'Selected';}?> value=<?php echo $admin['cat_id'];?>>
											<?php  echo $admin['name'];?>
										</option>
										<?php }?>
								</select></td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Theme Name:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="themeName" class="form_input" id="themeName"
									value="<?php echo $themeName['theme_name'];?>" type="text"></td>
							</tr>
							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>

							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>


							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>

							<tr>
							</tr>
							<tr>
								<td colspan="10" height="58" align="center"><input name="update"
									class="form_input" id="update" value="Update Content"
									type="submit">&nbsp;<input value="Cancel" class=""
									onclick="javascript:history.back();" type="reset">

									</form>
								</td>
							</tr>
						</tbody>
					</table>

					</form>
				</td>
			</tr>
		</tbody>
	</table>
	<script type="text/javascript">
	function theme()
	{
	if(document.form1.themeName.value=='')
	{
	alert("Please Enter a Theme name ");
	document.form1.themeName.focus();
	return false;
	}
	if(document.form1.categoryName.value=='')
	{
		alert("Please Select Category");
		document.form1.categoryName.focus();
		return false;
	}
	}
	</script>